#include <linux/fs2.h>
#include <linux/blkdev.h>

int sb_set_blocksize(struct super_block *sb, int size)
{
	// if (set_blocksize(sb->s_bdev, size))
	// 	return 0;
	/* If we get here, we know size is power of two
	 * and it's value is between 512 and PAGE_SIZE */
	sb->s_blocksize = size;
	sb->s_blocksize_bits = blksize_bits(size);
	return sb->s_blocksize;
}

int sb_min_blocksize(struct super_block *sb, int size)
{
	// int minsize = bdev_logical_block_size(sb->s_bdev);
	int minsize = 512;
	if (size < minsize)
		size = minsize;
	return sb_set_blocksize(sb, size);
}
